import type { PropType } from 'vue'
import type { TColumn } from './type'
import { update } from 'lodash-es'

export const tableProps = {
  name: {
    required: true,
    type: String as PropType<string>,
  },
  rowKey: {
    type: [String, Function] as PropType<string>,
    default: 'id'
  },
  queryServe: {
    type: String as PropType<string>,
    default: 'consulate'
  },
  queryApi: {
    type: String as PropType<string>,
    default: ''
  },
  queryStore: {
    type: String as PropType<string>,
    default: ''
  },
  queryParams: {
    type: Object as PropType<{ [key: string]: any }>,
    default: () => { }
  },
  columns: {
    type: Array as PropType<TColumn[]>,
    default: () => []
  },
  customCol: {
    default: false,
    type: Boolean as PropType<boolean>,

  },
  tableSelected: {
    default: false,
    type: Boolean as PropType<boolean>,
  }
}